package Controllers.GenericToolsForController;


 /*   Definitions :
  * STEPNAME_PASSED - Means that the step has finished, with all the reuqired data for example - EVL_PASSED
  * 
  * STEPNAME_TIME_EXTENSION_PENDING -
  * 
  * STEPNAME_EXTENDED - 
  * 
  * 
  */
public enum RequestStepStatusEnum 
{
	// ----- First Stages ---------
	
	INITIAL("1"), //the request just oppened
	
	NOMINATED("2"), //the icm manger assigend inspector and committee member to request
	
	INILIZED("3"), // the task was intilezed by the inspector
	
	// --- not in table ----
	
	///////--------------- Step 1 : Evluation 
	EVL_UNVALUATED_WTIHOUT_TIME("4"), //evluator didnt choose time or inspector denied the time that suggested
	
	EVL_UNVALUATED_WITH_TIME_PENDING("5"),//waiting for inspector premision to the time choosen
	
	EVL_UNVALUATED_WITH_TIME("6"), // inspector approved the time for evluation
	
	EVL_RETURNED_TO_REVALUTION("7"),// the request has returned to revluation
	
	EVL_EVLUATION_TIME_EXTENSION_PENDING("8"),// the elvuator asked for the delay of the finish time
	
	EVL_EVLUATION_EXTENDED("9"), // time extended
	
	EVL_EVLUATION_EXTENDED_DENY("10"),// extension denied
	
	EVL_PASSED("11"),//the evluator finised the current step
	
	EVL_REAVLAUTION_TIME_EXTENSION_PENDING("31"),// The evluator has asked for time extension when asked to enter more details
	
	EVL_REAVLAUTION_TIME_EXTENSION_EXTENDED("32"), // The inspector approved the time extension for re-evaluation
	
	EVL_REAVLAUTION_TIME_EXTENSION_DENIED("33"), // The inspector denied the time extension for re-evaluation
	
	EVL_REAVLAUTION_WITH_TIME("34"), // The inspector approved the time  for re-evaluation

	EVL_REAVLAUTION_WITH_TIME_PENDING("35"), //waiting for inspector premision to the time choosen
		
	//////--------------------- end step 1 -------------------
	
	
	///////--------------- step 2 : Review And Decision ------------------------
	REV_REVIEWED_PASSED("12"),
	
	REV_REVIEWED_CLOSE("13"),
	
	REV_REVIEWED_TIME_EXTENSION_PENDING("14"),
	
	REV_REVIEWED_EXTENDED("15"), // time extended
	
	REV_REVIEWED_EXTENDED_DENY("16"),// extension denied
	
	//////--------------------- end step 2 -------------------
	
	//////----- step 3  : Execuation   
	EXE_UNEXECUTED_WTIHOUT_TIME("17"),//evluator didnt choose time or inspector denied the time that suggested
	
	EXE_UNEXECUTED_WTIH_TIME_PENDING("18"),
	
	EXE_UNEXECUTED_WITH_TIME("19"),
	
	EXE_PASSED("20"),
	
	EXE_REXECUTE("21"), // returned form testing level because of failure
	
	EXE_UNEXECUTED_TIME_EXTENSION_PENDING("22"),
	
	EXE_UNEXECUTED_EXTENDED("23"), // time extended
	
	EXE_UNEXECUTED_EXTENDED_DENY("24"),// extension denied
	/////////--------------------- end step 3
	
	
	/// --- step 4 : Testing
	TST_PASSED("25"),
	
	TST_UTESTED_TIME_EXTENSION_PENDING("26"),
	
	TST_UTESTED_EXTENDED("27"), // time extended
	
	TST_UTESTED_EXTENDED_DENY("28"),// extension denied
	
	//--- end step 4
	
	//---- step 5 : Closing
	CLS_PASSED("29"),
	
	
	
	/// end step 5
	
	FINISH_HANDLE_REQUEST("30"); // every request that has CLS_PASSED moved to this status
	
	
	
	 private String text;

	RequestStepStatusEnum(String text) 
	{
	    this.text = text;
	  }
	 
	 public String getText() 
	 {
		 return this.text;
	 }
	
	 public static RequestStepStatusEnum fromString(String text) 
	 {
		 if (text != null) 
		 {
		    for (RequestStepStatusEnum b : RequestStepStatusEnum.values()) 
		    {
		        if (text.equalsIgnoreCase(b.text)) 
		        {
		          return b;
		        }
		      }
		    }
		    return null;
	  }
	 
	 
	
}




